import Vue from 'vue'
import Router from 'vue-router'


import Home from '../lib/components/Home.vue'
import Shoping from '../lib/components/Shoping.vue'
import Shopcar from '../lib/components/Shopcar.vue'
import AboutMe from '../lib/components/AboutMe.vue'

import Newspage from '../lib/components/news/Newspage.vue'
import Newsinfo from '../lib/components/news/Newsinfo.vue'

//PhotoList组件中的mui.js不能使用
import PhotosList from '../lib/components/photos/photosList.vue'
import PhotosInfo from '../lib/components/photos/photosInfo.vue'


import GoodsInfo from '../lib/components/goods/GoodsInfo.vue'
import GoodsDetailedInfo from './lib/components/goods/GoodsDetailedInfo.vue'
import GoodsComments from '../lib/components/goods/GoodsComments.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:Home},
    {path:'/shoping',component:Shoping},
    {path:'/shopcar',component:Shopcar},
    {path:'/aboutme',component:AboutMe},

    //新闻组件
    {path:'/home/newspage',component: Newspage},
    {path:'/home/newsinfo/:id',component: Newsinfo},

    //图片组件
    {path:'/home/photoslist',component: PhotosList},
    {path:'/home/photosinfo/:id',component: PhotosInfo},
    
    // 商品详情页面
    {path:'/shoping/goodsinfo/:id',component:GoodsInfo,name:'goodsinfo'},
    {path:'/shoping/goodsdetailedinfo/:id',component:GoodsDetailedInfo,name:'goodsdetailedinfo'},
    {path:'/shoping/goodscomments/:id',component:GoodsComments,name:'goodscomments'},
  ]
})
